// 用户相关的所有请求
import { getLoginUrl, getProfileUrl } from "@/constants/apiconfig"
import { request } from "@/utils"

// 1. 登录请求
export function loginAPI (formData) {
  const loginUrl = getLoginUrl()
  return request({
    url: loginUrl.url,
    method: loginUrl.method,
    data: formData
  })
}

// 2. 获取用户信息
export function getProfileAPI () {
  const profileUrl = getProfileUrl()
  return request({
    url: profileUrl.url,
    method: profileUrl.method
  })
}